#include<bits/stdc++.h>

using namespace std;
using ll = long long;
#define endl '\n'

#define REP(i, x, y) for (auto i = (x), _##i = (y); i < _##i; ++i)
#define PER(i, x, y) for (auto i = (x), _##i = (y); i > _##i; --i)

template<class T=int>
inline void OO(const T &coll, const char *del = ",") {
    copy(coll.begin(), coll.end(), ostream_iterator<decltype(*coll.begin())>(cerr, del));
    cerr << endl;
}

ll dp[30][30];
int n, m;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    n = 30;
    REP(i, 0, n)dp[i][i] = dp[i][0] = 1;
    REP(i, 1, n) REP(j, 0, i + 1)dp[i][j] = dp[i - 1][j] + dp[i - 1][j - 1];
    while (cin >> n >> m)
        cout << dp[n][m] << endl;

    return 0;
}
